package com.api.syh56.shengyunhui.entity;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableLogic;
import com.baomidou.mybatisplus.annotation.TableName;
import com.gitee.sunchenbin.mybatis.actable.annotation.Column;
import com.gitee.sunchenbin.mybatis.actable.annotation.ColumnComment;
import com.gitee.sunchenbin.mybatis.actable.annotation.DefaultValue;
import lombok.Builder;
import lombok.Data;

import java.math.BigDecimal;
import java.time.LocalDateTime;

/**
 * 货物
 */
@Data
@Builder
@TableName("quote")
public class Quote {

    @Column(name = "id",isKey = true,isAutoIncrement = true,comment = "报价id")
    private Long id;

    @Column(name = "waybill_id")
    @ColumnComment("运单id")
    private Long waybillId;

    @Column(name = "driver_id")// 司机ID
    private Long driverId;

    @Column(name = "shiper_id")// 货主ID
    private Long shiperId;

    @Column(name = "offer_init") // 专线报价
    @ColumnComment("技术服务费")
    @DefaultValue("0")
    private BigDecimal offerInit;

    @Column(name = "offer_price") // 专线报价
    @ColumnComment("报价")
    @DefaultValue("0")
    private BigDecimal offerPrice;

    @Column(name = "offer_all") // 报价+技术服务费
    @ColumnComment("报价+技术服务费")
    @DefaultValue("0")
    private BigDecimal offerAll;

    /**
     * 实际支付金额
     */
    @Column(name = "act_amount",comment = "实际支付金额")
    @DefaultValue("0")
    private BigDecimal actAmount;
    /**
     * 期望送达天数
     */
    @Column(name = "expected_delivery_days")
    @ColumnComment("期望送达天数")
    private int expectedDeliveryDays;

    @Column(name = "expected_delivery_time")
    @ColumnComment("预计配送时间")
    private LocalDateTime expectedDeliveryTime;

    @Column(name = "car_number",comment = "车牌号码")
    private String carNumber;

    /**
     * 车牌颜色(1 蓝色、2 黄色、3 黄绿色)
     */
    @Column(name = "card_color",comment = "车牌颜色")
    private String cardColor;


    /**
     * 状态
     */
    @Column(name = "status",comment = "状态")
    private Short status;

    @Column(name = "is_change")
    @DefaultValue("false")
    private Boolean isChange;


    @Column(name = "eid",comment = "设备号")
    private String eid;

    @Column(name = "cuo_id",comment = "优惠券Id")
    private Long cuoId;

    @Column(name = "deposit") // 定金
    @ColumnComment("定金")
    @DefaultValue("10")
    private BigDecimal deposit;

    @TableField(fill = FieldFill.INSERT)
    @Column(name = "creator_user_id")
    private Long creatorUserId;

    @Column(name = "creation_time")
    @TableField(fill = FieldFill.INSERT)
    private LocalDateTime creationTime;

    @TableField(fill = FieldFill.INSERT_UPDATE)
    @Column(name = "last_modifier_user_id") // 最后修改者用户ID
    private Long lastModifierUserId;

    @Column(name = "last_modification_time") // 最后修改时间
    @TableField(fill = FieldFill.INSERT_UPDATE)
    private LocalDateTime lastModificationTime;

    @TableLogic
    @Column(name = "is_deleted")
    @DefaultValue("false")
    private Boolean isDeleted;
}
